package com.jtcoding.chat.dao.chat;

import com.jtcoding.chat.model.Friend;
import com.jtcoding.chat.model.FriendRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author jason.tang
 * @create 2019-01-31 17:27
 * @description
 */
@Mapper
public interface FriendDao {

    List<Friend> getFriendListByUserNum(Integer userNum);

    int addFriendRequest(FriendRequest friendRequest);

    List<FriendRequest> getFriendRequestListByUserNum(Integer userNum);

    int updateFriendRequest(FriendRequest friendRequest);

    int addFriend(Friend... friends);

    FriendRequest getFriendRequest(@Param("fromUserNum") Integer fromUserNum, @Param("toUserNum") Integer toUserNum);
}
